package com.czy.reflect;


import com.czy.annotation.Pro;

@Pro(className = "class")
public class ReflectDemo1 {

    @Pro(className = "fielda")
    private String a="字段a";

    protected String b="字段b";

    String c="字段c";

    public String d="字段d";

    @Pro(className = "method")
    public void publicShow(){
        System.out.println("public方法");
    }

    void defaultShow(){
        System.out.println("default方法");
    }

    protected void protectedShow(){
        System.out.println("protected方法");
    }

    private void privateShow(){
        System.out.println("private方法");
    }

    public ReflectDemo1() {
        System.out.println("public无参构造");
    }

    protected ReflectDemo1(String b){
        this.b=b;
        System.out.println("protected有参构造方法");
    }

    ReflectDemo1(String a, String b){
        this.a=a;
        this.b=b;
        System.out.println("default有参构造方法");
    }

    private ReflectDemo1(String a, String b, String c){
        this.a=a;
        this.b=b;
        this.c=c;
        System.out.println("private有参构造方法");
    }
}
